<?php

namespace App\Http\Controllers\V1_bak;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class TestController extends Controller
{
    public function test()
    {
        /**
         * test
         */
        phpinfo();
    }

    /**
     * 自动拉取代码
     * webHooks
     * author: walker
     * Date: 2019/11/18
     * Time: 10:52
     * Note:
     */
    public function webHooks()
    {
        $requestBody = file_get_contents("php://input");

        // 只需这一行代码便可拉取
        $res = shell_exec("cd /srv/www/api/ && git pull"); // 目录换成项目的目录
        dd($res);
    }
}
